home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #2 / Ham Radio 2000 - Volume 2.iso / HAMV2 / MISC / WINLINK / WLDLL._ / WLDLL.
Text File  |  1995-11-15  |  8KB  |  251 lines

  1. // Project..........WinLink
  2. // File Name........WLDLL.H
  3. // File Version.....12/24/92
  4. //
  5. // Copyright (c) 1992 - All Rights Reserved
  6. // Victor D. Poor, W5SMM
  7. // 8819 Welles Edge
  8. // San Antonio, Texas, USA 78240
  9.  
  10. // Modification Log: Hans A. Kessler - N8PGR
  11. //    1.2    Added function WLDLLversion()
  12. // 1.3A     - Added WLM_TRFCSTATUS and respones
  13. // 1.3B  - Added WLM_QTC
  14.  
  15. #ifndef WLDLL_H
  16. #define WLDLL_H
  17.  
  18. #define COMPLETE  0
  19. #define WILD      1
  20.  
  21. #include "..\win.h"
  22.  
  23. // Startup Function...
  24. extern BOOL FAR PASCAL RegisterWinlinkApplication (HWND hwnd,
  25.    const char *szAppName, const char *szInstName);
  26. extern BOOL FAR PASCAL UnregisterWinlinkApplication (HWND hwnd);
  27. extern void FAR PASCAL _export WLDLLversion (char FAR *cur_vers);
  28.  
  29. // Intertask command messages...
  30. #define WLM_SHOWMAX     WM_USER + 1
  31. #define WLM_SHOWMIN     WM_USER + 2
  32. #define WLM_SHOWNORMAL  WM_USER + 3
  33. #define WLM_LINKSTATUS  WM_USER + 4
  34. #define WLM_BBSSTATUS   WM_USER + 5
  35. #define WLM_SETBBS      WM_USER + 6
  36. #define WLM_SETKSR      WM_USER + 7
  37. #define WLM_SETCALL     WM_USER + 8
  38. #define WLM_CALL        WM_USER + 9
  39. #define WLM_AUTOFWD     WM_USER + 10
  40. #define WLM_SEND        WM_USER + 11
  41. #define WLM_ENDLINK     WM_USER + 12
  42. #define WLM_RESET       WM_USER + 13
  43. #define WLM_UPDATE      WM_USER + 14
  44. #define WLM_INTERCEPT   WM_USER + 15
  45. #define WLM_WPAGES      WM_USER + 16
  46. #define WLM_TRFCSTAT    WM_USER + 17
  47. #define WLM_MONITOR     WM_USER + 18
  48. #define WLM_QTC         WM_USER + 19
  49. #define WLM_LONG_ROB    WM_USER + 20  // LongPath (Pactor) or Robust (Clover)
  50.  
  51. // Intertask status responses...
  52. #define WLR_FAILURE     0
  53. #define WLR_SUCCESS     1
  54. #define WLR_NO          0
  55. #define WLR_YES         1
  56. #define WLR_STANDBY     2
  57. #define WLR_CALLING     3
  58. #define WLR_LINKED      4
  59. #define WLR_KSR         2
  60. #define WLR_CLOSED      3
  61. #define WLR_OPEN        4
  62. #define WLR_TRAFFIC        5
  63. #define WLR_QUIET            6
  64.  
  65. // BBS numbers...
  66. #define BBS00     0
  67. #define BBS01     1
  68. #define BBS02     2
  69. #define BBS03   3
  70. #define BBS04   4
  71. #define BBS05   5
  72. #define BBS06   6
  73. #define BBS07   7
  74. #define BBS08   8
  75. #define BBS09   9
  76. #define BBS10  10
  77. #define BBS11  11
  78. #define BBS12  12
  79. #define BBS13  13
  80. #define BBS14  14
  81. #define BBS15  15
  82. #define BBS16  16
  83. #define BBS17  17
  84. #define BBS18  18
  85. #define BBS19  19
  86. #define BBS20  20
  87. #define BBS21  21
  88. #define BBS22  22
  89. #define BBS23  21
  90. #define BBS24  24
  91. #define BBS25  25
  92. #define BBS26  26
  93. #define BBS27  27
  94. #define BBS28  28
  95. #define BBS29  29
  96. #define BBS30  30
  97. #define BBS31  31
  98.  
  99. // Intertask Communications Functions...
  100. extern HWND FAR PASCAL GetWinlinkApplicationHandle (const char *szAppName, const char *szInstName);
  101. extern WORD FAR PASCAL SendWinlinkMessage (HWND hwnd, WORD wMsg, WORD wParam);
  102.  
  103. // USER FILE DEFINITIONS
  104.  
  105. // User status flags...
  106. #define  US_MBO         0x00000001L
  107. #define  US_EXPERT      0x00000002L  // US_EXPERT is not currently used by Winlink
  108. #define  US_NOPURGE     0x00000004L
  109. #define  US_LOCKOUT     0x00000008L
  110. #define  US_HOLDMSGS    0x00000010L
  111.  
  112. // User data structure...
  113. typedef struct
  114. {
  115.    DWORD          dwAccess;      // User privilage mask
  116.    char           szCall   [7];  // User call letters
  117.    char           szSelcal [5];  // User selcal
  118.    char           szPrefix [6];  // User prefix
  119.    char           szSuffix [6];  // User suffix
  120.    long           lLogin;        // Time of last login
  121.    long           lLastmsg;      // Last message number listed
  122.    long           lLastbul;      // Last bulletin number listed
  123. } USER;
  124.  
  125. // User data functions...
  126. extern BOOL FAR PASCAL IsValidCall    (char *szCall);
  127. extern int  FAR PASCAL GetIndexedUser (HWND, int, USER FAR *);
  128. extern int  FAR PASCAL GetUser        (HWND, char FAR *, USER FAR *);
  129. extern int  FAR PASCAL UpdateUser     (HWND, USER FAR *);
  130. extern int  FAR PASCAL DeleteUser     (HWND, char FAR *);
  131. extern int  FAR PASCAL PurgeUserFile  (HWND);
  132.  
  133.  
  134. // MESSAGE FILE DEFINITIONS   
  135.  
  136. // Title line for mcb string
  137. #define SYSMCBTITLE "NUMBER TS   SIZE TO     FROM   AT     FILED(Z)  SUBJECT"
  138.  
  139. // Message Status Word Flags
  140. // Message Source
  141. #define  MB_SYSOP       0x00000001L
  142. #define  MB_PACKET      0x00000002L
  143. #define  MB_AMTOR       0x00000004L
  144. #define  MB_PACTOR      0x00000008L
  145. #define  MB_CLOVER      0x00000010L
  146. #define  MB_IMPORT      0x00000020L
  147.  
  148. // Message Status
  149. #define  MB_STATIC      0x00000100L
  150. #define  MB_PENDING     0x00000200L
  151. #define  MB_FORWARDED   0x00000400L
  152. #define  MB_REJECTED    0x00001000L
  153. #define  MB_ONHOLD      0x00002000L
  154. #define  MB_CANCELLED   0x00004000L
  155. #define  MB_BUSY        0x00008000L
  156.  
  157. // Type of message
  158. #define  MB_BULLETIN    0x00010000L
  159. #define  MB_PRIVATE     0x00020000L
  160. #define  MB_NTS         0x00040000L
  161. #define  MB_HELP        0x00080000L
  162.  
  163. // Log tags
  164. #define  MB_WPUPDATE    0x10000000L
  165. #define  MB_LOGGEDIN    0x20000000L
  166. #define  MB_LOGGEDOUT   0x40000000L
  167.  
  168. // Structure used by parser...
  169. typedef struct
  170. {
  171.    char *szText;         // Original string containing the command
  172.    int  iCount;          // Number of tokens found (max of 8)
  173.    int  fPlusQuery;      // 1 if +? in text, else 0
  174.    char szTok [12] [42]; // Array of tokens taken from orig
  175. } TOKS;
  176.  
  177. // Message control block (MCB) structure...
  178. typedef struct 
  179. {
  180.    DWORD dwMSW;               // Message status word
  181.    DWORD dwForward;           // Multiaddress bit map
  182.    int  iLocation;            // Location of mcb in the mcb file
  183.    long lMsgNumber;           // Message number
  184.    long lOriginalMsgNumber;   // Originating station message number
  185.    long lSize;                // Message length
  186.    long lArrivalTime;         // Time/date message entered this system
  187.    long lOriginationTime;     // Time/date message was originated
  188.    long lForwardingTime;      // Time/date message was forwarded
  189.    char szMID [16];           // Message (Bulletin) identification
  190.    char szTo [7];             // Call/Designator of destination station(s)
  191.    char szAt [40];            // Routing to destination
  192.    char szFrom [7];           // Call of originating station
  193.    char szOriginatingBBS [7]; // Call of originating bbs
  194.    char szForwardingBBS [7];  // Call of bbs forwarding message to this station
  195.    char szMsgFile [21];       // Name of file containing message
  196.    char szTitle [64];         // Title (subject) of the message
  197. } MCB, *MCBPTR;
  198.  
  199. // GetMCB () search requests
  200. #define FORWARD   1
  201. #define REVERSE   2
  202. #define MSGNUMBER 3
  203.  
  204. // GetMCB () field flags
  205. #define FF_TO     1
  206. #define FF_AT     2
  207. #define FF_FROM   4
  208.  
  209. // Message search mask structure...
  210. typedef struct
  211. {
  212.    int   iLastIndex;
  213.    WORD  wRequest;
  214.    DWORD dwMSW;
  215.    WORD  wFieldFlags;
  216.    char  szTo   [7];
  217.    char  szAt   [40];
  218.    char  szFrom [7];
  219.    long  lMsgNumberLimit;
  220. } SEARCHMASK;
  221.  
  222. // Message data functions...
  223. extern int  FAR PASCAL GetMCB (HWND hwnd, SEARCHMASK FAR *sm, MCB FAR *pMcb);
  224. extern BOOL FAR PASCAL MidMatch (HWND hwnd, char *szMID);
  225. extern void FAR PASCAL Mcb2Str (MCB FAR *pMcb, char FAR *szMcb);
  226. extern int  FAR PASCAL UpdateMCB (HWND hwnd, MCB FAR *pMcb);
  227. extern long FAR PASCAL GetNewMessageNumber (HWND hwnd);
  228. extern long FAR PASCAL GetLastMessageNumber  (HWND hwnd);
  229. extern int  FAR PASCAL AddNewMCB (HWND hwnd, MCB FAR *);
  230. extern void FAR PASCAL Parse (const char *szText, const char *szDelimit, TOKS *t);
  231. extern void FAR PASCAL SetBusy (HWND hwnd, MCB FAR *);
  232. extern void FAR PASCAL ClearBusy (HWND hwnd, MCB FAR *);
  233.  
  234.  
  235. // Note: CSTR is defined elsewhere as "const char*"
  236.  
  237. extern CSTR FAR PASCAL Station ();
  238. extern CSTR FAR PASCAL Selcal  ();
  239. extern CSTR FAR PASCAL Prefix  ();
  240. extern CSTR FAR PASCAL Postfix ();
  241. extern CSTR FAR PASCAL QTH     ();
  242.  
  243. extern CSTR FAR PASCAL DataPath (CSTR szName);
  244. extern CSTR FAR PASCAL MessagePath (CSTR szName);
  245. extern CSTR FAR PASCAL BinaryPath (CSTR szName);
  246. extern CSTR FAR PASCAL LogPath (CSTR szName);
  247. extern CSTR FAR PASCAL Route ();
  248. extern BOOL FAR PASCAL IsOwnHeader ();
  249.  
  250. #endif
  251.